package com.github.prontera.domain.enums;

import com.github.prontera.common.mybatis.handler.CodeEnum;

/**
 * 通用枚举类型
 */
public enum AppSmsTemplateEnum implements CodeEnum<AppSmsTemplateEnum> {

	REGISTER(0, "SMS_16725327","注册短信验证码"),LOGIN(1, "SMS_16725327","注册短信验证码"),UPDATE_PWD(2, "SMS_16725327","修改密码")
	,LOOK_WECHAT(3, "SMS_16725327","查看微信")
	;

	private int code;
	private String desc;
	private String mark;
	

	/**
     * 通过枚举<code>name</code>获取枚举
     */
    public static AppSmsTemplateEnum getEnumByCode(Integer code) {
    	if(code==null){
    		return null;
    	}
        for (AppSmsTemplateEnum enumm : AppSmsTemplateEnum.values()) {
            if (enumm.getCode()==code.intValue()) {
                return enumm;
            }
        }
        return null;
    }
	
	private AppSmsTemplateEnum(int code, String desc) {
		this.code = code;
		this.desc=desc;
	}

	private AppSmsTemplateEnum(int code, String desc,String mark) {
		this.code = code;
		this.desc=desc;
		this.mark=mark;
	}
	
	 
	public String getMark() {
		return mark;
	}

	public void setMark(String mark) {
		this.mark = mark;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	@Override
	public int getCode() {
		return code;
	}

	public String getDesc() {
		return desc;
	}

}
